home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0919.dms / q0919.adf / man / Protect < prev    next >
Text File  |  1997-04-10  |  5KB  |  127 lines

  1.  
  2.  
  3.  
  4.           Protect(V1.3, 2.x/3.x in C:)
  5.  
  6.  
  7.  
  8.      NAME
  9.           Protect - To set file(s) protection status.
  10.  
  11.      SYNOPSIS
  12.           1.3:
  13.           Protect [File] name [Flags] [s] [p] [a] [r]
  14.                   [w] [e] [d] [ADD or -] [SUB or -] 
  15.  
  16.           2.x/3.x:
  17.           Protect [File] name [Flags] [s] [p] [a] [r] 
  18.                   [w] [e] [d] [ADD or -] [SUB or -] 
  19.                   [ALL] [QUIET]
  20.  
  21.  
  22.      DESCRIPTION
  23.             Protect is used to set the protection level of a file 
  24.         or files.  You may set the protection level for multiple 
  25.         files or directories at a time using wildcards. The flags 
  26.         that you may set are:
  27.  
  28.         h  - hidden   file is protected from listing (not supported)
  29.         a  - archive  file has been archived (set by backup programs)
  30.         p  - pure     file may be made resident without fear
  31.         s  - script   file is a script (supported by some shells)
  32.         r  - read     file is readable (supported by some commands)
  33.         w  - write    file is writable (supported by some commands)
  34.         e  - execute  file is executable  (supported by some shells)
  35.         d  - delete   file is deletable (system supported)
  36.  
  37.             Setting or adding a flag allows the associated 
  38.         action.  Clearing or subtracting the flag disallows that 
  39.         action.  You can specify a completely new set of flags 
  40.         for a file by simply listing the flags you want to be 
  41.         turned on for that file (or files).  If you omit a flag, 
  42.         that flag will be cleared.  Protect with no flags 
  43.         disallows all protections for the file(s) in question.
  44.  
  45.             You can also add or subtract flags to the current set 
  46.         using the ADD and SUB keywords (see below) or by 
  47.         preceding the flags with a '+' character or a '-' 
  48.         character, respectively.
  49.  
  50.             To view the protection bits for a specific filename, 
  51.         you use the List command. If a flag character is shown in 
  52.         the LIST display then it is on. If the letter is not 
  53.         displayed, that bit is off.  In that case, there will be 
  54.         a dash (-) instead of a letter.
  55.  
  56.             The only setting which AmigaDOS acts upon are the 
  57.         read and write (r and w) bits.
  58.  
  59.  
  60.  
  61.           
  62.      OPTIONS
  63.  
  64.           FLAGS (s p a r w e d)
  65.             These are the protection flags which can be turned 
  66.         on/off with PROTECT. You don't have to include the FLAGS 
  67.         keyword, just the letters. If a FLAG is turned on then 
  68.         the operation associated with the flag may be carried 
  69.         out. If no flags are specified then all the flags are 
  70.         turned off. 
  71.  
  72.             NOTE: If the 'D' flag is set then the COPY command 
  73.         will not work on that file. This is because the COPY 
  74.         command actually deletes the old file and replaces it 
  75.         with the new one.
  76.  
  77.           ADD or [+]
  78.             The flags given are to be added to the current set 
  79.         for the file(s) in question. Other than adding these 
  80.         flags, the original protection bits of the file(s) will 
  81.         be left unchanged.  Another way to obtain this behavior 
  82.         is to use a '+' character as the first character of the 
  83.         flags you wish to add.
  84.  
  85.           SUB or [-]
  86.             The flags given are to be removed from the current 
  87.         set for the file(s) in question.  Other than subtracting 
  88.         these flags, the original protection bits of the file(s) 
  89.         will not affected.  Another way to obtain this behavior 
  90.         is use a '-' character as the first character of the 
  91.         flags you wish to subtract.
  92.  
  93.           ALL
  94.             2.x/3.x only:  Recursively descend directories, 
  95.         performing the desired operation on each file and 
  96.         directory for that branch of the directory tree.
  97.  
  98.           FILES
  99.             When using wildcards or the ALL keyword, Protect will 
  100.         change the protection bits for both files and 
  101.         directories.  Using this keyword will cause protect to 
  102.         only change the protection bits for Files. 1.3 does not 
  103.         allow you to use wildcards.
  104.  
  105.           DIRS
  106.             Like FILES, but changes the protection bits only for 
  107.         directories.
  108.  
  109.           QUIET [Q]
  110.             This causes Protect to do its work silently, without 
  111.         displaying the files and/or directories it is operating 
  112.         on.
  113.  
  114.      EXAMPLE
  115.  
  116.             1. To keep all files ending in .c from being deleted 
  117.         by subtracting the d flag for these files.
  118.  
  119.           Protect #?.c -d
  120.  
  121.  
  122.             2. To turn on the script and execute bits.  These 
  123.         bits allow some shells to execute the scripts as though 
  124.         they were programs.
  125.  
  126.           Protect #? +se
  127.